<?
foreach($result as $key=>$val){
?>
<tr>
	<td width="10" align="center">
	<input type="checkbox" name="demand[]" id="demand_check_box" value="<?=$val->demand_id?>">
	</td>
	<td><?=$val->name?></td>
	<td><? 
	if(isset($required_level[$val->required_level])) 
		echo $required_level[$val->required_level];
	else 
		echo "";
	?></td>
	<td><?=intval($val->building_area1)."<br/>~<br/>".intval($val->building_area2)?></td>
	<td><?=intval($val->indoor_area1)."<br/>~<br/>".intval($val->indoor_area2)?></td>
	<td><?=intval($val->land_area1)."<br/>~<br/>".intval($val->land_area2)?></td>
	<td><?=$val->sections1."<br/>~<br/>".$val->sections2?></td>
	<td><?=$val->key_areas1."<br/>~<br/>".$val->key_areas2?></td>
	<td><?=$val->circle1."<br/>~<br/>".$val->circle2?></td>
	<td><?=intval($val->total_budget1)."<br/>~<br/>".intval($val->total_budget2)?></td>
	<td><?=$val->broker?></td>
	<td><? 
	if(isset($object_usage[$val->object_usage])) 
		echo $object_usage[$val->object_usage];
	else 
		echo "";
	?></td>
	<td><?
		$t_str="";
		if($val->type_rent=="1"){
				$t_str="租";
		}
		if($val->type_sell=="1"){
				$t_str="售";
		}
		if($val->type_consignment>0){
				$t_str="代銷";
		}
		echo $t_str;
	?></td>
	<td><?=date("Y/m/d",$val->ctime)?></td>
	<td width="70px">
	<?
	if($val->type_consignment>0){
	?>
	<a href="<?=site_url('/consignment/edit/'.$val->demand_id)?>"><img src="/images/ico_edit_16.png" title="編輯" border="0" />
	<?
	}else{
	?>
	<a href="<?=site_url('/demand/data_edit/'.$val->demand_id)?>"><img src="/images/ico_edit_16.png" title="編輯" border="0" />
	<?
	}
	?>
	</a>
	<a href="<?=site_url('/pair/demand/'.$val->demand_id)?>"><img src="/images/arrow-join.png" title="配对" border="0"/></a>
	<a href="<?=site_url('/demand/data_delete/'.$val->demand_id)?>"><img src="/images/ico_delete_16.png" title="刪除" border="0"/></a>
	</td>
</tr>
<?
}
?>							